package H02.h2.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DBUtil {
    private static final String url = "jdbc:sqlserver://localhost:1433;databaseName=register;integratedSecurity=false;encrypt=true;trustServerCertificate=true;";
    private static final String user = "sa";
    private static final String password = "123456";

    public static Connection getConnection() throws Exception {
        String driverName="com.microsoft.sqlserver.jdbc.SQLServerDriver";
        Class.forName(driverName);
        return DriverManager.getConnection(url,user,password);
    }
}




